In [2]:
using Revise, NeuroAnalysis, Interact
rate = slider(0:100,value=50,label="Spike Rate")
duration = slider(0:5000,value=1000,label="Spike Train Duration")
refreshperiod = slider(1:5,value=2,label="Spike Refresh Period")
ntrain = slider(1:1000,value=100,label="Number of Spike Train")
vbox(rate,duration,refreshperiod,ntrain)
Out[2]:
In [3]:
sts = [poissonspike(rate[],duration[],rp=refreshperiod[]) for _ in 1:ntrain[]]
plotspiketrain(sts,timeline=[0,duration[]])
Out[3]:
In [4]:
sts = [poissonspike(t->rate[],duration[],rp=refreshperiod[]) for _ in 1:ntrain[]]
plotspiketrain(sts,timeline=[0,duration[]])
Out[4]:
In [5]:
sts = [poissonspike(t->rate[]*(sin(0.05t)+1),duration[],rp=refreshperiod[]) for _ in 1:ntrain[]]
plotspiketrain(sts,timeline=[0,duration[]])
Out[5]:
In [ ]: